package com.student.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TeacherPositionType entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Teacher_Position_Type", schema = "dbo", catalog = "StudentManager")
public class TeacherPositionType implements java.io.Serializable {

	// Fields

	private Long teacherPositionTypeId;
	private String teacherPositionTypeName;
	private Integer teacherPositionTypeLevel;
	private Set<Teacher> teachers = new HashSet<Teacher>(0);

	// Constructors

	/** default constructor */
	public TeacherPositionType() {
	}

	/** minimal constructor */
	public TeacherPositionType(Long teacherPositionTypeId,
			String teacherPositionTypeName, Integer teacherPositionTypeLevel) {
		this.teacherPositionTypeId = teacherPositionTypeId;
		this.teacherPositionTypeName = teacherPositionTypeName;
		this.teacherPositionTypeLevel = teacherPositionTypeLevel;
	}

	/** full constructor */
	public TeacherPositionType(Long teacherPositionTypeId,
			String teacherPositionTypeName, Integer teacherPositionTypeLevel,
			Set<Teacher> teachers) {
		this.teacherPositionTypeId = teacherPositionTypeId;
		this.teacherPositionTypeName = teacherPositionTypeName;
		this.teacherPositionTypeLevel = teacherPositionTypeLevel;
		this.teachers = teachers;
	}

	// Property accessors
	@Id
	@Column(name = "Teacher_Position_Type_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getTeacherPositionTypeId() {
		return this.teacherPositionTypeId;
	}

	public void setTeacherPositionTypeId(Long teacherPositionTypeId) {
		this.teacherPositionTypeId = teacherPositionTypeId;
	}

	@Column(name = "Teacher_Position_Type_Name", nullable = false, length = 20)
	public String getTeacherPositionTypeName() {
		return this.teacherPositionTypeName;
	}

	public void setTeacherPositionTypeName(String teacherPositionTypeName) {
		this.teacherPositionTypeName = teacherPositionTypeName;
	}

	@Column(name = "Teacher_Position_Type_Level", nullable = false)
	public Integer getTeacherPositionTypeLevel() {
		return this.teacherPositionTypeLevel;
	}

	public void setTeacherPositionTypeLevel(Integer teacherPositionTypeLevel) {
		this.teacherPositionTypeLevel = teacherPositionTypeLevel;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "teacherPositionType")
	public Set<Teacher> getTeachers() {
		return this.teachers;
	}

	public void setTeachers(Set<Teacher> teachers) {
		this.teachers = teachers;
	}

}